/*
 * @Author: yangzonglong
 * @Date: 2020-08-18 10:22:19
 * @version: v1.0.0
 * @Descripttion: 
 * @LastEditors: yangzonglong
 * @LastEditTime: 2020-10-09 09:18:33
 * @Auditor: 
 */
import { NativeButtonProps } from 'antd/es/button/button'
import { TableProps } from './../table/interface';
import { FormItemProps } from './../formx/interface';
import { TabItem } from './../tabs/Tabs'
import { ImportExportProps as _ImportExportProps } from './../table/importExport/ImportExport'

export interface ButtonProps extends NativeButtonProps {
  btnType?: 'create' | 'submit' | 'delete' | string; // 按钮类型
  pathname?: string
}

export interface ImportExportProps extends _ImportExportProps {
  importServerUrl: string
}

interface NewTabItem extends TabItem {
  locales?: { cn?: string; en?: string },
  query?: string | object,
  url?: string;
  columns?: string[]
}

export interface ListPageProps {
  table: TableProps<any>;
  tabs?: NewTabItem[];
  actions?: ButtonProps[];
  searchColumns?: string[];
  importExport?: ImportExportProps;
  noBreadcrumb?: boolean, // 不显示面包屑
  advancedSearchFormItems?: FormItemProps[];
  detailsUrl?: string; // 详情url
}

export type BtnClickEvent = React.MouseEvent<HTMLElement, MouseEvent>;